# Maintainer: Joel Hansen <joelh@disroot.org>
pkgname=castor
pkgver=0.8.16
pkgrel=0
pkgdesc="A graphical browser for Gemini, Gopher and Finger."
url="https://sr.ht/~julienxx/Castor/"
arch="all !s390x !mips !mips64" # limited by rust/cargo
license="MIT"
makedepends="rust cargo gtk+3.0-dev openssl-dev"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~julienxx/castor/archive/$pkgver.tar.gz"

build() {
	cargo build --release --locked --verbose
}

check() {
	cargo test --release --locked -- --test-threads=1
}

package() {
	install -Dm755 target/release/castor "$pkgdir"/usr/bin/castor
	install -Dm644 data/Castor.desktop -t "$pkgdir"/usr/share/applications
	install -Dm644 data/org.typed-hole.castor.svg -t "$pkgdir"/usr/share/pixmaps
}

sha512sums="a26c56fc6258f67d7f97cb0b2ec264ebede7a20b0ac167e0aaee35cc02d7326da84febf881d3473a93cd441a372d9466d5bf816fd662fe0ad09f008c566a8c2a  castor-0.8.16.tar.gz"
